<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="Planet.aspx.vb" Inherits="Planet" Title="Planet" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <asp:Button ID="btnBeginRefresh" runat="server" Text="Begin Refresh" />
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="ObjectDataSource1"
            Height="50px" Width="400px">
            <Fields>
                <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                <asp:BoundField DataField="OrdinalNumber" HeaderText="OrdinalNumber" SortExpression="OrdinalNumber" />
                <asp:BoundField DataField="MaxFields" HeaderText="MaxFields" SortExpression="MaxFields" />
                <asp:BoundField DataField="HighestTemperature" HeaderText="HighestTemperature" SortExpression="HighestTemperature" />
                <asp:BoundField DataField="LowestTemperature" HeaderText="LowestTemperature" SortExpression="LowestTemperature" />
                <asp:BoundField DataField="GalaxyIndex" HeaderText="GalaxyIndex" SortExpression="GalaxyIndex" />
                <asp:BoundField DataField="SystemIndex" HeaderText="SystemIndex" SortExpression="SystemIndex" />
                <asp:BoundField DataField="PlanetIndex" HeaderText="PlanetIndex" SortExpression="PlanetIndex" />
                <asp:BoundField DataField="EnergyGenerationPotentialTotal" HeaderText="EnergyGenerationPotentialTotal" SortExpression="EnergyGenerationPotentialTotal" />
                <asp:BoundField DataField="EnergyConsumptionPotentialTotal" HeaderText="EnergyConsumptionPotentialTotal" SortExpression="EnergyConsumptionPotentialTotal" />
                <asp:BoundField DataField="LocalTime" HeaderText="LocalTime" SortExpression="LocalTime" />
                <asp:BoundField DataField="ServerTime" HeaderText="ServerTime" SortExpression="ServerTime" />
                <asp:BoundField DataField="ConstructionETA" HeaderText="ConstructionETA" SortExpression="ConstructionETA" />
                <asp:BoundField DataField="ResearchETA" HeaderText="ResearchETA" SortExpression="ResearchETA" />
            </Fields>
        </asp:DetailsView>
        <br />
        <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1">
            <ItemTemplate>
                <table border="1">
                    <colgroup>
                        <col />
                        <col class="numeric" />
                        <col class="numeric" />
                        <col class="numeric" />
                        <col class="numeric" />
                        <col />
                    </colgroup>
                    <tr>
                        <th>
                            Resource</th>
                        <th>
                            Available</th>
                        <th>
                            Production</th>
                        <th>
                            Capacity(k)</th>
                        <th>
                            Storage(%)</th>
                        <th>
                            Overflow ETA</th>
                    </tr>
                    <tr>
                        <td>
                            Metal</td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("Metal") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("MetalProduction") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text='<%# Eval("MetalCapacity") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("MetalStoragePercentage") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label6" runat="server" Text='<%# Eval("MetalOverflowETA") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Crystal</td>
                        <td>
                            <asp:Label ID="Label7" runat="server" Text='<%# Eval("Crystal") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label8" runat="server" Text='<%# Eval("CrystalProduction") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label9" runat="server" Text='<%# Eval("CrystalCapacity") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label10" runat="server" Text='<%# Eval("CrystalStoragePercentage") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label11" runat="server" Text='<%# Eval("CrystalOverflowETA") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Deuterium</td>
                        <td>
                            <asp:Label ID="Label12" runat="server" Text='<%# Eval("Deuterium") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label13" runat="server" Text='<%# Eval("DeuteriumProduction") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label14" runat="server" Text='<%# Eval("DeuteriumCapacity") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("DeuteriumStoragePercentage") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label16" runat="server" Text='<%# Eval("DeuteriumOverflowETA") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Total</strong></td>
                        <td>
                            <asp:Label ID="Label17" runat="server" Text='<%# Eval("Total") %>' Font-Bold="True"></asp:Label></td>
                        <td>
                            <asp:Label ID="Label18" runat="server" Text='<%# Eval("TotalProduction") %>' Font-Bold="True"></asp:Label></td>
                        <td>
                            </td>
                        <td>
                            </td>
                        <td>
                            <%--
                            <asp:Label ID="Label21" runat="server" Text='<%# Eval("TotalOverflowETA") %>' Font-Bold="True"></asp:Label>
                            --%>
                        </td>
                    </tr>
                </table>
                <br />
                <table border="1">
                    <colgroup>
                        <col />
                        <col class="numeric" />
                        <col class="numeric" />
                        <col class="numeric" />
                    </colgroup>
                    <tr>
                        <th>
                            Factory</th>
                        <th>
                            Energy
                        </th>
                        <th>
                            Potential</th>
                        <th>
                            Workload(%)</th>
                    </tr>
                    <tr>
                        <td>
                            Metal Mine
                        </td>
                        <td>
                            <asp:Label ID="Label22" runat="server" Text='<%# Eval("MetalMineEnergy") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label20" runat="server" Text='<%# Eval("MetalMineEnergyConsumptionPotential") %>'></asp:Label>&nbsp;</td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("MetalMineProductionPercentage") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Crystal Mine
                        </td>
                        <td>
                            <asp:Label ID="Label23" runat="server" Text='<%# Eval("CrystalMineEnergy") %>'></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label34" runat="server" Text='<%# Eval("CrystalMineEnergyConsumptionPotential") %>'></asp:Label>&nbsp;</td>
                        <td>
                            <asp:Label ID="Label29" runat="server" Text='<%# Eval("CrystalMineProductionPercentage") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Deuterium Synthesizer
                        </td>
                        <td>
                            <asp:Label ID="Label24" runat="server" Text='<%# Eval("DeuteriumSynthesizerEnergy") %>'></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label35" runat="server" Text='<%# Eval("DeuteriumSynthesizerEnergyConsumptionPotential") %>'></asp:Label>&nbsp;</td>
                        <td>
                            <asp:Label ID="Label30" runat="server" Text='<%# Eval("DeuteriumSynthesizerProductionPercentage") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <strong>Total</strong></td>
                        <td>
                            <asp:Label ID="Label25" runat="server" Text='<%# Eval("EnergyConsumptionTotal") %>' Font-Bold="True"></asp:Label></td>
                        <td>
                            <asp:Label ID="Label19" runat="server" Font-Bold="True" Text='<%# Eval("EnergyConsumptionPotentialTotal") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label21" runat="server" Text='<%# Eval("ProductionFactor") %>' Font-Bold="False"
                                Font-Italic="True"></asp:Label></td>
                    </tr>
                </table>
                <br />
                <table border="1">
                    <colgroup>
                        <col />
                        <col class="numeric" />
                        <col class="numeric" />
                    </colgroup>
                    <tr>
                        <th>
                            Generator</th>
                        <th>
                            Energy</th>
                        <th>
                            Workload(%)</th>
                    </tr>
                    <tr>
                        <td>
                            Solar Plant</td>
                        <td>
                            <asp:Label ID="Label26" runat="server" Text='<%# Eval("SolarPlanetEnergy") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label31" runat="server" Text='<%# Eval("SolarPlanetProductionPercentage") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Fusion Reator</td>
                        <td>
                            <asp:Label ID="Label27" runat="server" Text='<%# Eval("FusionReactorEnergy") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label32" runat="server" Text='<%# Eval("FusionReactorProductionPercentage") %>'></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            Solar Satelites</td>
                        <td>
                            <asp:Label ID="Label28" runat="server" Text='<%# Eval("SolarSateliteEnergy") %>'></asp:Label></td>
                        <td>
                            <asp:Label ID="Label33" runat="server" Text='<%# Eval("SolarSateliteProductionPercentage") %>'></asp:Label></td>
                    </tr>
                </table>
                <br />
                <asp:Image ID="Image1" runat="server" AlternateText='<%# Eval("Name") %>' ImageUrl='<%# Eval("LargeImageUri") %>' />
            </ItemTemplate>
        </asp:FormView>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetPlanetView" TypeName="OGame.Empire">
            <SelectParameters>
                <asp:QueryStringParameter Name="planetId" QueryStringField="cp" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataSourceID="ObjectDataSource2">
            <Columns>
                <asp:BoundField DataField="Gid" HeaderText="Gid" ReadOnly="True" SortExpression="Gid" />
                <asp:BoundField DataField="Level" HeaderText="Level" ReadOnly="True" SortExpression="Level" />
                <asp:BoundField DataField="MetalCost" HeaderText="MetalCost" ReadOnly="True" SortExpression="MetalCost" />
                <asp:BoundField DataField="CrystalCost" HeaderText="CrystalCost" ReadOnly="True"
                    SortExpression="CrystalCost" />
                <asp:BoundField DataField="DeuteriumCost" HeaderText="DeuteriumCost" ReadOnly="True"
                    SortExpression="DeuteriumCost" />
                <asp:CheckBoxField DataField="Ready" HeaderText="Ready" ReadOnly="True" SortExpression="Ready" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetUpgradeCommands"
            TypeName="OGame.PlanetView"></asp:ObjectDataSource>
    </div>
</asp:Content>
